package lambada;

import java.util.ArrayList;
import java.util.List;

public class LambdaDemo1 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("one");
        list.add("two");
        list.add("three");
        list.add("four");
        list.add("five");
        list.forEach(System.out::println);
        list.sort((s1,s2)->s1.length()-s2.length());
        System.out.println(list);
    }
}
